package com.ldy.seal.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 签章配置
 * 
 * @author lindeyi
 *
 */
@Configuration
@ConfigurationProperties("sealconfig")
public class SealConfig {

	/** 签名原因 */
	private String reason;
	/** pdf文件存放位置 */
	@Value("${sealconfig.savepath:PDFIMG}")
	private String savepath;
	/**印章保存路径*/
	private String sealSavepath;
	/** 证书存放目录 */
	private String certSavePath;
	/** 证书密码 */
	private String certPassword;
	/** 根证书 */
	private CertConfig rootCert;
	/** CA证书 */
	private CertConfig caCert;
	/** 服务端证书 */
	private CertConfig serviceCert;

	/**
	 * 证书配置
	 *
	 */
	public static class CertConfig {
		private String serialNumber; // 书序列号
		private String aliasName; // 别名
		private String commonName; // 证书名称
		private String unitName; // 上海市禁毒委员会
		/**
		 * @return the serialNumber
		 */
		public String getSerialNumber() {
			return serialNumber;
		}
		/**
		 * @param serialNumber the serialNumber to set
		 */
		public void setSerialNumber(String serialNumber) {
			this.serialNumber = serialNumber;
		}
		/**
		 * @return the commonName
		 */
		public String getCommonName() {
			return commonName;
		}
		/**
		 * @param commonName the commonName to set
		 */
		public void setCommonName(String commonName) {
			this.commonName = commonName;
		}
		/**
		 * @return the unitName
		 */
		public String getUnitName() {
			return unitName;
		}
		/**
		 * @param unitName the unitName to set
		 */
		public void setUnitName(String unitName) {
			this.unitName = unitName;
		}
		/**
		 * @return the aliasName
		 */
		public String getAliasName() {
			return aliasName;
		}
		/**
		 * @param aliasName the aliasName to set
		 */
		public void setAliasName(String aliasName) {
			this.aliasName = aliasName;
		}
		
	}

	/**
	 * @return the reason
	 */
	public String getReason() {
		return reason;
	}

	/**
	 * @param reason the reason to set
	 */
	public void setReason(String reason) {
		this.reason = reason;
	}

	/**
	 * @return the savepath
	 */
	public String getSavepath() {
		return savepath;
	}

	/**
	 * @param savepath the savepath to set
	 */
	public void setSavepath(String savepath) {
		this.savepath = savepath;
	}

	/**
	 * @return the certSavePath
	 */
	public String getCertSavePath() {
		return certSavePath;
	}

	/**
	 * @param certSavePath the certSavePath to set
	 */
	public void setCertSavePath(String certSavePath) {
		this.certSavePath = certSavePath;
	}

	/**
	 * @return the certPassword
	 */
	public String getCertPassword() {
		return certPassword;
	}

	/**
	 * @param certPassword the certPassword to set
	 */
	public void setCertPassword(String certPassword) {
		this.certPassword = certPassword;
	}

	/**
	 * @return the rootCert
	 */
	public CertConfig getRootCert() {
		return rootCert;
	}

	/**
	 * @param rootCert the rootCert to set
	 */
	public void setRootCert(CertConfig rootCert) {
		this.rootCert = rootCert;
	}

	/**
	 * @return the caCert
	 */
	public CertConfig getCaCert() {
		return caCert;
	}

	/**
	 * @param caCert the caCert to set
	 */
	public void setCaCert(CertConfig caCert) {
		this.caCert = caCert;
	}

	/**
	 * @return the serviceCert
	 */
	public CertConfig getServiceCert() {
		return serviceCert;
	}

	/**
	 * @param serviceCert the serviceCert to set
	 */
	public void setServiceCert(CertConfig serviceCert) {
		this.serviceCert = serviceCert;
	}

	/**
	 * @return the sealSavepath
	 */
	public String getSealSavepath() {
		return sealSavepath;
	}

	/**
	 * @param sealSavepath the sealSavepath to set
	 */
	public void setSealSavepath(String sealSavepath) {
		this.sealSavepath = sealSavepath;
	}



}
